import request from '@/utils/request'

// 查询费用预算申请列表
export function listFinanceBudget(query) {
  return request({
    url: '/oa/financeBudget/list',
    method: 'get',
    params: query
  })
}

// 查询费用预算申请详细
export function getFinanceBudget(id) {
  return request({
    url: '/oa/financeBudget/' + id,
    method: 'get'
  })
}

// 新增费用预算申请
export function addFinanceBudget(data) {
  return request({
    url: '/oa/financeBudget',
    method: 'post',
    data: data
  })
}

// 修改费用预算申请
export function updateFinanceBudget(data) {
  return request({
    url: '/oa/financeBudget',
    method: 'put',
    data: data
  })
}

// 删除费用预算申请
export function delFinanceBudget(id) {
  return request({
    url: '/oa/financeBudget/' + id,
    method: 'delete'
  })
}

// 获取没有采购流程的项目信息
export function getProjectList() {
    return request({
        url: '/oa/financeBudget/getProjectList',
        method: 'get'
    })
}


export function queryFinanceBudgetByProjectName(data) {
  return request({
    url: '/oa/financeBudget/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
